import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/core/http/http.dart';
import 'package:enterprise_v6_app/app/core/utils/interface.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standardization_entity.dart';

/// 规章规程
class StandardizationRegulationRuleController extends GetxController {
  Future<List<StandardizationEntity>> getPages(int idx, int size, {String? search}) async {
    final resp = await HttpUtil().generateGetRequest<List<StandardizationEntity>>(
      '${Interface.mainBaseUrl}/standard//rulesRegulations/getRulesAndRegulationsPage',
      queryParameters: {
        'pageNum': idx,
        'pageSize': size,
        'name': search,
      },
    ).execute();
    return resp.data ?? [];
  }
}